import React, {Component} from 'react';
import {
    StyleSheet,
    View,
    WebView
} from 'react-native';

import colors from "../common/colors";
import Global from "../common/global";

export default class GlobalMap extends Component {

    static navigationOptions =({navigation, screenProps}) => ({
        headerTintColor: colors.headerText,
        headerTitle: '全球地图',
        headerStyle: {
            backgroundColor: colors.headerBg,
            borderBottomColor: colors.headerBottom,
            paddingTop: Global.paddingTop,
            height: Global.navigationHeaderHeight
        },
        headerTitleStyle: {
            alignSelf: 'center',
        },
        headerRight: <View/>,
        headerBackTitle: null
    })

    render() {
        return (
            <View style={styles.container}>
               <WebView
                   source={{uri: 'https://earth.nullschool.net/zh-cn/'}}
                   style={{flex : 1}}
               />
            </View>
        );
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        backgroundColor: '#000',
    },
});
